Skip to content

Appbar MD3 Expressive improvements - #5075

Open
pawelkata wants to merge 34 commits into
callstack:mainfrom
pawelkata:appbar-improvements
Open

Appbar MD3 Expressive improvements#5075
pawelkata wants to merge 34 commits into
callstack:mainfrom
pawelkata:appbar-improvements

Conversation

@pawelkata

@pawelkata pawelkata commented Aug 25, 2026

Copy link
Copy Markdown

Motivation

Replace the legacy compound Appbar API with a prop-driven Material 3 implementation. This adds small, flexible, and search variants; filled actions; scroll-aware colors; safe-area handling; and improved accessibility. Documentation, examples, and downstream usages are updated accordingly.

Related issue

Related issue: #4934

Also based on comments on Appbar from here: #4949 (comment) .

Caveats

The search bar is dropped in verbatim as it needs a separate pool of work to properly handle the "search" variant. Deliberately skipped any animations related work at this stage due to lack of testing device and the PR already being quite big. Can be tackled at a later stage.

NOTE: The PR drops support for the bottom app bar variant, which is now - according to the official docs - part of the Toolbars.

Test plan

  • Run yarn test src/components/__tests__/Appbar.
  • Run yarn lint and yarn typecheck.
  • Verify all Appbar variants in the example app, including search, scrolling, centered headlines, actions, and safe areas.
  • Verify accessibility labels, element order, disabled states, and headline interactions with a screen reader.

Comment thread src/components/Appbar/types.ts
Comment thread src/components/Appbar/types.ts
Comment thread src/components/Appbar/types.ts
Comment thread src/components/Appbar/AppbarButton.tsx Outdated
elevation={elevation}
ref={ref}
testID={`${testID}-root-layer`}
elevation={0}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

md.comp.app-bar.on-scroll.container.elevation resolves to level2, but elevation is pinned to 0 - isScrolled only changes the container colour. Intentional?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm probably missing something here, but... according to MD3 guidelines here: https://m3.material.io/components/app-bars/guidelines and the Figma kit, there's no elevation in appbars -- just the color indication that content was scrolled.

Comment thread src/components/Appbar/Appbar.tsx Outdated
Comment thread src/components/Appbar/types.ts
Comment thread src/components/Appbar/AppbarContent.tsx Outdated
Comment thread src/components/Appbar/AppbarButton.tsx Outdated
Comment thread src/components/Appbar/Appbar.tsx Outdated
@JKobrynski

Copy link
Copy Markdown
Collaborator

@pawelkata can you resolve the comments that have been addressed? 🙏

adam-sajko added a commit to adam-sajko/react-native-paper that referenced this pull request Aug 27, 2026
callstack#4934 proposes an `actions` prop API for Appbar and callstack#5075 implements it,
so the children refactor here is superseded. Appbar sources, tests and
snapshots go back to their state on main.
@adam-sajko

adam-sajko commented Aug 27, 2026

Copy link
Copy Markdown

docs/6.x/docs/guides/migration.md has no entry for this yet, and dropping Appbar.Header, Appbar.Content, Appbar.Action and Appbar.BackAction is worth mentioning in "before" and "after" there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants